{% extends 'test_orm/base.html' %}
{% block page_content %}
<!--Bootstrap的面板控件-->
<div class="panel panel-primary">
    <div class="panel-heading">
        <!--这里加标题-->
        <h3 class="panel-title">增加员工</h3>
    </div>
    <div class="panel-body">
        <div class="row">
            <div class="col-md-6 col-md-offset-3">
                <form action="/test_orm/add_employee/" method="post" class="form-horizontal">
                    {% csrf_token %}
                    <div class="form-group">
                        <label for="name" class="col-md-4 control-label">姓名:</label>
                        <div class="col-md-8">
                            <input type="text" name="name" class="form-control" id="name" placeholder="请输入姓名:">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="email" class="col-md-4 control-label">邮箱:</label>
                        <div class="col-md-8">
                            <input type="text" name="email" class="form-control" id="email" placeholder="请输入邮箱:">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="salary" class="col-md-4 control-label">薪水:</label>
                        <div class="col-md-8">
                            <input type="text" name="salary" class="form-control" id="salary" placeholder="请输入薪水:">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="info" class="col-md-4 control-label">联系信息:</label>
                        <div class="col-md-8">
                            <select name="info" class="form-control" id="info">
                                {% for info in info_list %}
                                <option value="{{info.id}}">{{info.phone}}||{{info.address}}</option>
                                {% endfor %}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="dep" class="col-md-4 control-label">部门:</label>
                        <div class="col-md-8">
                            <select name="dep" class="form-control" id="dep">
                                {% for dep in dep_list %}
                                <option value="{{dep.id}}">{{dep.dep_name}}</option>
                                {% endfor %}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="group" class="col-md-4 control-label">团队:</label>
                        <div class="col-md-8">
                            <select name="group" class="form-control" id="group" multiple="true">
                                {% for group in group_list %}
                                <option value="{{group.id}}">{{group.group_name}}</option>
                                {% endfor %}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-offset-4 col-md-8">
                            <input type="submit" class="btn btn-primary" value="增加">
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{% endblock %}
{% block employeecls %}
active
{% endblock %}